{extend name="base" /}
{block name="content"}
<div class="layui-fluid">
  <div class="layui-card">
    <form class="layui-form" action="{:url('admin/dp/save_review')}" method="post">
      <div class="layui-form-item">
        <label class="layui-form-label">课程名称</label>
        <div class="layui-input-block">
          <input type="text" name="course_name" required lay-verify="required" placeholder="请输入课程名称" class="layui-input">
        </div>
      </div>

      <div class="layui-form-item">
        <label class="layui-form-label">师资团队</label>
        <div class="layui-input-block">
          <input type="text" name="expert_team" placeholder="请输入师资团队" class="layui-input">
        </div>
      </div>
           <div class="layui-form-item">
  <label class="layui-form-label">师资</label>
  <div class="layui-input-block">
    {foreach name="expert_list" item="expert"}
      <input type="checkbox" name="expert_ids[]" title="{$expert.name}" value="{$expert.id}" lay-skin="primary">
    {/foreach}
  </div>
</div>
      <div class="layui-form-item">
        <label class="layui-form-label">标题图片</label>
        <div class="layui-input-inline">
          <input type="text" name="cover_img" id="cover_img" placeholder="请上传封面图" class="layui-input">
          <img id="preview_img" style="max-height:100px; display:none;" />
        </div>
        <button type="button" class="layui-btn" id="upload_img">上传图片</button>
      </div>

      <div class="layui-form-item">
        <label class="layui-form-label">回顾视频</label>
        <div class="layui-input-inline">
          <input type="text" name="video_url" id="video_url" placeholder="请上传视频" class="layui-input">
          <video id="preview_video" controls style="display:none;max-height:150px;"></video>
        </div>
        <button type="button" class="layui-btn" id="upload_video">上传视频</button>
      </div>

      <div class="layui-form-item">
        <label class="layui-form-label">介绍</label>
        <div class="layui-input-block">
          <textarea name="description" class="layui-textarea" placeholder="请输入精彩回顾介绍"></textarea>
        </div>
      </div>

      <div class="layui-form-item">
        <div class="layui-input-block">
          <button class="layui-btn" lay-submit lay-filter="submitReview">提交</button>
        </div>
      </div>
    </form>
  </div>
</div>
{/block}

---

## ✅ JavaScript 部分 `{block name="js"}`

```html
{block name="js"}
<script>
layui.use(['form', 'upload'], function(){
  var form = layui.form,
      upload = layui.upload;

  // 图片上传
  upload.render({
    elem: '#upload_img',
    url: '/index/index/upload',
    field: 'file',
    done: function(res){
      if(res.code === 1){
        var url = '/public/' + res.data.url;
        $('#cover_img').val(url);
        $('#preview_img').attr('src', url).show();
        layer.msg('上传成功');
      } else {
        layer.msg('上传失败');
      }
    }
  });

  // 视频上传
  upload.render({
    elem: '#upload_video',
    url: '/index/index/upload',
    accept: 'video',
    field: 'file',
    done: function(res){
      if(res.code === 1){
        var url = '/public/' + res.data.url;
        $('#video_url').val(url);
        $('#preview_video').attr('src', url).show();
        layer.msg('上传成功');
      } else {
        layer.msg('上传失败');
      }
    }
  });

  // 表单提交（ajax）
  form.on('submit(submitReview)', function(data){
    $.ajax({
      url: data.form.action,
      type: data.form.method,
      data: $(data.form).serialize(),
      success: function(info){
        if(info.code === 1){
          layer.msg(info.msg);
          setTimeout(function(){
            window.location.href = "{:url('admin/dp/review')}";
          }, 1000);
        } else {
          layer.msg(info.msg);
        }
      }
    });
    return false;
  });
});
</script>
{/block}
